package com.job.Gai_Yian.Homework0715;

/**
 * @author Gai_Yian
 * @version 1.0
 * @since 2022-07-15 15:11:13
 */
public class StringCompare {
    public static void main(String[] args) {
        String name1="lucy",name2="luck";
        System.out.println(name1.compareTo(name2));
        System.out.println("luc".compareTo(name2));
        System.out.println("luck".compareTo(name2));

        String s1=new String(new char[]{'A','1','!'});
        s1=s1+name1;
        System.out.println(s1);
        s1=s1.concat("1999");
        System.out.println(s1);
    }
}
